public class Cylinder extends Circle {
    double h; // 圆柱的高度
    // 对圆柱的属性进行设置和获取
    public double getH(){
        return h;
    }
    public void setH(double h){
        this.h = h;
    }
    // 计算圆柱的表面积
    public double cylinderArea(){
        double cylinder_area = 2*super.area() + super.perimeter()*h;
        return cylinder_area;
    }
    // 计算圆柱的体积
    public double volume(){
        double cylinder_volume = super.area()*h; // 底面积乘以高
        return cylinder_volume;
    }
}
